package com.zhangfb95.crosschain.console.config.configuration;

import com.zhangfb95.crosschain.console.config.properties.ServerProperties;
import com.zhangfb95.crosschain.sdk.CrossChainClient;
import com.zhangfb95.crosschain.sdk.CrossChainClientBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhangfubing
 * @since 2023/12/21
 */
@Configuration
public class ServerConfiguration {

    @Autowired
    private ServerProperties serverProperties;

    @Bean
    public CrossChainClient crossChainClient() {
        return new CrossChainClientBuilder().build(serverProperties);
    }
}
